<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/web/head.jsp"%>
</head>
<body>
	<div style="width: 85%; margin-top: 25px;" align="center">
		<form class="layui-form" lay-filter="f">
			<div class="layui-form-item">
				<label class="layui-form-label">稿费/字</label>
				<div class="layui-input-block">
					<input type="text" name="articlePay" lay-verify="number" value="0"
						placeholder="请输入稿费" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">审查费</label>
				<div class="layui-input-block">
					<input type="text" name="checkPay" lay-verify="number" value="0"
						placeholder="请输入审查费" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">版面费</label>
				<div class="layui-input-block">
					<input type="text" name="pagePay" lay-verify="number" value="0"
						placeholder="请输入版面费" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<input type="button" class="layui-btn" lay-submit
						lay-filter="formDemo" value="提交"> <input type="reset"
						class="layui-btn layui-btn-primary" value="重置">
				</div>
			</div>
			<input name="action" value="upd" type="hidden">
			<input name="typeId" value="" type="hidden">
		</form>
	</div>
	<script type="text/javascript">
	
		var typeId = '<%= request.getParameter("typeId")%>'
		
		ajax('/TypePayServlet', 'json', {
			name : typeId,
			action : 'getModel'
		}, function(res) {
			form.val("f",res)
		})
		
		formOnSubmit('formDemo', 'text', '/TypePayServlet', function(res) {
			if (res == "success") {
				layer.msg("修改成功", {
					time : 1000,
					icon : 6
				}, frameClose)
			} else {
				layer.msg("修改失败", {
					time : 1000,
					icon : 5
				}, frameClose)
			}
		})
	</script>
</body>
</html>